import React, { useEffect, useState } from 'react'
import axios from 'axios'
import Addressalert from '../../components/Addressalert'
import Addresslist from '../../components/Addresslist'

function My(props) {
  let [address,setaddress]=useState([])
  useEffect(()=>{
    axios.get('/address').then(res=>{
      setaddress(res.data)
    })
  },[])
  return (
    <div>
      <Addresslist address={address}></Addresslist>
      <Addressalert></Addressalert>
    </div>
  )
}

export default My